<template>
      <el-menu
      active-text-color="#363ca5"
                text-color="#666"
                router
                
      >
        <el-sub-menu v-for="menu in menuList.menuData" :index="menu.mid+''">
          <template #title>
            <el-icon><component :is="menu.glyphicon"></component></el-icon>
            <span>{{menu.menuname}}</span>
          </template>
          <el-menu-item v-for="subm in menu.menuList" :index="subm.url">
            <el-icon><component :is="subm.glyphicon"></component></el-icon>
            <span>{{subm.menuname}}</span>
        </el-menu-item>
        </el-sub-menu>


        
      </el-menu>
</template>

<script setup>
import {ref,reactive,onMounted} from 'vue'
import {get,post} from '@/myaxios'
import router from '@/router'
import axios from 'axios';

const menuList = reactive({menuData:[]})

onMounted(async()=>{
   let resp=    await axios.get("/adminMenu/getUserMenus",{})
   console.log(resp.data);
   
           menuList.menuData=resp.data.data
})
//点击菜单跳转页面
// const goPage = (currentUrl)=>{
//     router.push(currentUrl)
// }



</script>

<style scoped>

</style>